//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class TextSpacingInPercent : TextSpacing
    {
        private int val;

        public int Value
        {
            get { return val; }
            set { val = value; }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("spcPct"))
            {
                Value = c.GetInteger("val");
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("spcPct"))
            {
                c.SetInteger("val", Value);
            }
        }
    }
}